package com.spark.demostream.consumer;

import com.spark.demostream.producter.SendMsg;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Service;


/**
 * 消费者
 * @author fuqiang
 *
 */
@Service
public class ReceviceMsgImpl2 {

    private static Logger logger = LoggerFactory.getLogger(ReceviceMsgImpl2.class);

    @StreamListener(SendMsg.INPUT_CHANNEL2)
    public void receive(Message message) {
        System.out.println("消息接收2: "+message.getPayload());
    }
}

